﻿Imports Phila
Imports Phila.Sql
Imports Phila.CommonClasses

Public Class Safaris
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Try
            ltrTitle.Text = "<h2>Safaris</h2>"
            Fill_dtList(dlTours, "select t.*,z.Name as ZoneName, ISNULL(tc.pax_1,0) as Price from ptn_Tours t inner join ptn_CatZoneTours zt on zt.tourid=t.id inner join ptn_Zones z on z.id=zt.zoneid left join ptn_TourCost tc on tc.tourid=t.id where t.IsActive=1 and t.IsSafari=1 order by Name")
            If dlTours.Items.Count = 0 Then
                lblMsg.Text = "<p>No Safari available</p>"
            End If
        Catch ex As Exception
            Throw ex
        End Try
    End Sub

    Public Function IsPriceNull(ByVal Value As Integer) As String
        If Value = 0 Then
            Return "<span class=""contact"">Contact for price</span>"
        Else
            Return "<span class=""label"">Starts from</span><span class=""amount"">" & Value & "</span>"
        End If
    End Function

End Class